package com.itheima.dao.impl;

import com.itheima.dao.TeacherDao;

public class TeacherDaoImpl implements TeacherDao {
    private String name;
    private int age;

    public TeacherDaoImpl() {
    }

    @Override
    public String toString() {
        return "StudentDaoImpl{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public TeacherDaoImpl(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public void save() {
        System.out.println("老师姓名"+name);
        System.out.println("老师年龄"+age);
    }
}
